package com.scm.service;

import com.scm.dao.StockMapper;
import com.scm.pojo.CheckStock;
import com.scm.pojo.Stock;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @ClassName StockService
 * @Description TODO
 * @Author Xu
 * @Date 2021/7/15 10:30
 * @Version 1.0
 **/
@Service
public class StockService implements StockMapper {

    @Autowired
    private StockMapper stockMapper;
    @Override
    public void addStock(Stock stock) {
        stockMapper.addStock(stock);
    }

    @Override
    public List<Stock> getStock(String productCode) {
        return stockMapper.getStock(productCode);
    }

    @Override
    public void addCheckStock(CheckStock checkStock) {
        stockMapper.addCheckStock(checkStock);
    }

    @Override
    public List<CheckStock> getCheckStock(String productCode) {
        return stockMapper.getCheckStock(productCode);
    }

    @Override
    public List<Stock> outMonthSoMain(Map<String, Object> map) {
        return stockMapper.outMonthSoMain(map);
    }

    @Override
    public int outAllMonthSoMain(Map<String,Object> map) {
        return stockMapper.outAllMonthSoMain(map);
    }
}
